@ var _user = c.currentUser(request, servlet.response);
@ layout("/common/_layout.html"){
	<div class="wrap">
    <div class="content detail">
      <h1>${topic.title!}</h1>
      <div class="fly-tip fly-detail-hint" data-id="{{rows.id}}">
        	@ if(topic.isNice!){
            	<span class="fly-tip-jing">精帖</span>
        	@ }
            @ if(topic.isUp!){
            	<span class="fly-tip-stick">置顶</span>
        	@ }
        	@ if(topic.isClose!){
        		<span class="fly-tip-jie">已采纳</span>
        	@ }else{
            	<span>未结贴</span>
        	@ }
        <!-- <span class="jie-admin" type="del" style="margin-left: 20px;">删除</span>
        <span class="jie-admin" type="set" field="stick" rank="1">置顶</span> 
        <span class="jie-admin" type="set" field="stick" rank="0" style="background-color:#ccc;">取消置顶</span>
        <span class="jie-admin" type="set" field="status" rank="1">加精</span> 
        <span class="jie-admin" type="set" field="status" rank="0" style="background-color:#ccc;">取消加精</span> -->
        
        <div class="fly-list-hint"> 
          <i class="iconfont" title="回答">&#xe60c;</i> ${topic.postCount!}
          <i class="iconfont" title="人气">&#xe60b;</i> ${topic.pv!}
        </div>
      </div>
      <div class="detail-about">
        <a class="jie-user" href="">
          <img src="${topic.user.headImg!}" alt="${topic.user.username!}">
          <cite>
            ${topic.user.username!}
            <em>${printTime(topic.createTime)} 发布</em>
          </cite>
        </a>
        <div class="detail-hits" data-id="">
          <span style="color:#FF7200">悬赏：${topic.point }飞吻</span>
          @ if(_user! != null && _user.id == topic.user.id){
	          <span class="jie-admin" type="edit"><a href="${ctxPath}/topic/edit/${topic.id}">编辑此贴</a></span>
          @}
        </div>
      </div>
      <div class="detail-body photos" style="margin-bottom: 20px;">
        ${topic.content!}
        <div  class="fly-ad" style="margin-top: 30px; height:90px; overflow: hidden;"></div>
      </div>
      <a name="comment"></a>
      <h2 class="page-title">热忱回答<span>（<em id="jiedaCount">${topic.postCount!}</em>）</span></h2>
      <ul class="jieda photos" id="jieda">
        @ for(post in postPage.list!){
	        <li data-id="${post.id!}">
	          <a name="item-121212121212"></a>
	          <div class="detail-about detail-about-reply">
	            <a class="jie-user" href="${ctxPath}/user/${post.userID!}">
	              <img src="${post.user.headImg!}" alt="${post.user.username!}">
	              <cite>
	                <i>${post.user.username!}</i>
	                <em style="color:#FF9E3F">${post.user.tag!}</em>
	              </cite>
	            </a>
	            <div class="detail-hits">
	              <span>${printTime(post.createTime)}</span>
	            </div>
	            @ if(topic.isClose && post.accept){
		        	<i class="iconfont icon-caina" title="最佳答案"></i>
		        @}
	          </div>
	          <div class="detail-body jieda-body">
	            ${post.content}
	          </div>
	          <div class="jieda-reply">
	            <span class="jieda-zan" type="zan"><i class="iconfont icon-zan"></i><em>0</em></span>
	            <span type="reply"><i class="iconfont icon-svgmoban53"></i>回复</span>
	            <div class="jieda-admin">
		            @ if(_user! != null && _user.id == topic.user.id){
	              		<span type="del">删除</span>
	              		@ if(!topic.isClose ){
		          			<span class="jieda-accept" type="accept">采纳</span>
		          		@}
	          		@}
	            </div>
	          </div>
	          <div class="detail-body jieda-body">
	           			 @ if(post.replyPage != null){
                            @ include("/reply/_reply.html", {"replyPage":post.replyPage, "postID":post.id}){}
                        @ }
	          </div>
	        </li>
        @ }
        <!-- <li class="fly-none">没有任何回答</li> -->
      </ul>
      <div class="layui-form layui-form-pane">
        <form action="${ctxPath}/post/save" method="post">
        	<input type="hidden" name="post.topicID" value="${topic.id!}"/>
          	@ include("/common/_editer.html", {"textarea_name" : "post.content"}){}
	          <div class="layui-form-item">
	            <button class="layui-btn" lay-filter="*" type="submit">提交回答</button>
	          </div>
        </form>
      </div>
      
    </div>
  </div>
@ include("/common/_sidebar.html"){}
@ }